#include "hardinfor.h"
using namespace Yzty;

HardInfor* HardInfor::_instance=nullptr;

HardInfor::HardInfor(QObject *parent) : QObject(parent)
{

}


HardInfor* HardInfor::GetInstance(QObject* parent)
{
    if(HardInfor::_instance==nullptr)
        HardInfor::_instance=new HardInfor(parent);
    return HardInfor::_instance;
}

HardInfor::~HardInfor()
{
    for(auto& p:this->_infors)
        for(BaceInfor* infor:p.second)
            delete  infor;
}



const std::vector<BaceInfor*> HardInfor::GetNormalCheck(Yzty::HardToolCode modelindex)
{
    return this->_infors[modelindex];
}

void HardInfor::Clear()
{
    this->_infors.clear();
}
